import request from "@/utils/request";


export function createOrder(data){
    return request({
        url:'/order/createOrder',
        method:'POST',
        data:data
    })
}

export function list(params){
    return request({
        url:'/order/selectAll',
        method:'GET',
        params:params
    })
}

export function selectOrderDetail(orderNo){
    return request({
        url:'/order/selectOrderDetail/'+orderNo,
        method:'GET'
    })
}


export function cancelOrder(orderNo){
    return request({
        url:'/order/cancel/'+orderNo,
        method:'GET'
    })
}

export function cancelBatch(data){
    return request({
        url:'/order/cancelBatch',
        method:'POST',
        data:data
    })
}


export function deleteOrder(orderNo){
    return request({
        url:'/order/delete/'+orderNo,
        method:'GET',
    })
}


export function deleteBatch(data){
    return request({
        url:'/order/deleteBatch',
        method:'POST',
        data:data
    })
}


export function findOrderDetailListByPage(params){
    return request({
        url:'/order/findOrderDetailListByPage',
        method:'GET',
        params:params
    })
}

export function findPatientOrderList(params){
    return request({
        url:'/order/findPatientOrderList',
        method:'GET',
        params:params
    })
}


export function downloadMedicalCertificate(certificateNo){
    return request({
        url:'/medical-certificate/downloadMedicalCertificate/'+certificateNo,
        method:'GET',
        responseType: 'blob'
    })
}

export function serviceEvaluation(params){
    return request({
        url:'/order/serviceEvaluation',
        method:'GET',
        params:params
    })
}